1. Field
Example embodiments of the present invention relate to an orientation calculation apparatus or a storage medium having an orientation calculation program stored therein, and more particularly to an orientation calculation apparatus for calculating an orientation of an input device or a storage medium having stored therein an orientation calculation program for calculating an orientation of an input device.
2. Description of the Background Art
Conventionally, a technique for calculating an orientation of an input device by using an acceleration sensor and a gyro sensor is considered. For example, Patent Document 1 (Japanese Laid-Open Patent Publication No. 2000-308756) discloses a game apparatus using an input control device including an acceleration sensor and a gyro sensor. This game apparatus controls as word held by a game character in accordance with movement of the input control device. Specifically, data representing an action of wielding the sword is generated based on an output from the acceleration sensor, and data representing an orientation of the sword is generated based on an output from the gyro sensor.
When the orientation is calculated by using the gyro sensor as described in Patent Document 1, an error may occur between the calculated orientation and an actual orientation of the input control device. For example, when the movement of the input control device is slow, the gyro sensor may fail to detect an angular rate of the input control device, whereas when the movement of the input control device is vigorous, the angular rate of the input control device may be outside a range in which the gyro sensor is allowed to detect for the angular rate. Further, also when the angular rate abruptly changes in a period shorter than an interval of an output of angular rate data, the error may occur. The error of the angular rate is cumulatively added to the orientation calculated based on the angular rate over the passage of time, and therefore the error of the orientation may be increased. In Patent Document 1, the error of the orientation calculated by the gyro sensor is not considered, and therefore the orientation may not be accurately calculated.